<div class="title">User actions</div>

<?php if ($us->hasCredential('profile.edit')):?>
<div><a href="<?php echo $ro->gen('profile.list');?>">Profiles</a></div>
<?php endif;?>
<?php if (!$us->hasRole('blog-owner')): // blog owner cannot edit his data from that page ?>
<div><a href="<?php echo $ro->gen('own_profile.view'); ?>">View my profile</a></div>
<div><a href="<?php echo $ro->gen('own_profile.edit'); ?>">Edit my profile</a></div>
<?php endif;?>
<?php if ($us->hasCredential('posts.write')):?>
<div><a href="<?php echo $ro->gen('post.write'); ?>">Write new post</a></div>
<?php endif;?>
<?php if ($us->hasCredential('pictures.edit')):?>
<div><a href="<?php echo $ro->gen('pic.list');?>">View pictures</a></div>
<?php endif;?>
<?php if ($us->hasCredential('settings.edit')):?>
<div><a href="<?php echo $ro->gen('settings.edit');?>">Blog settings</a></div>
<?php endif;?>
<?php if ($us->hasCredential('backup') || $us->hasCredential('restore')):?>
<div><a href="<?php echo $ro->gen('backup.index');?>">Backup and restore</a></div>
<?php endif;?>
<?php if ($us->hasCredential('comments.moderator')):?>
<div><a href="<?php echo $ro->gen('comment.moderation');?>">Comments moderation
<?php if ($t['not_appropved_comments'] > 0) {
    printf('(%d)', $t['not_appropved_comments']);
}
?></a></div>
<?php endif;?>
